include Makefile.config

all: $(PROJECT) plugins

$(PROJECT): $(PROJECT_OBJ) $(PROJECT_INC)
	$(CC) $(LDFLAGS) $(LIBDIR) $(LIBS) -o $(TARGET) $(PROJECT_OBJ)


%.o: %.c $(PROJECT_INC)
	$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@

plugins: $(PROJECT)
	@(cd $(PLUGINS_DIR) && $(MAKE))

clean:
	rm -f src/*.o
	rm -f $(TARGET)
	@(cd $(PLUGINS_DIR) && $(MAKE) clean)

.PHONY: clean
